import time

def bubl (v):
    f = open(v)
    a = f.readlines()
    f.close()
    m  = []

    for i in range(len(a)):
        m.append(int(a[i]))    
    for i in range(len(m)):
        for j in range(len(m)-1):
            if m[j-1] > m[j]  :
                b = m[j]
                m[j] = m[j-1]
                m[j-1] = b

    return(m)
a1 = time.time()
bubl ('m1_sorted.txt')
a2 = time.time()
print ('m1_sorted',round(a2 - a1)*1000,'milliseconds')
a1 = time.time()
bubl ('m2_reverse.txt')
a2 = time.time()
print ('m2_reverse',round(a2 - a1)*1000,'milliseconds')
a1 = time.time()
bubl ('m3_shuffle.txt')
a2 = time.time()
print ('m3_shuffle',round(a2 - a1)*1000,'milliseconds')


